﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cadastro
{
    public partial class Form1 : Form
    {
        public Form2 Form2 { get; set; }

        public List<Cliente> clientes { get; set; }
        //public Cliente ClienteAtual;

        public Form1()
        {
            InitializeComponent();
            clientes = new List<Cliente>();

            Form2 = new Form2(clientes);
        }



        private void buttonAdd_Click(object sender, EventArgs e)
        {
            
            Form2.Show();
            Refresh();
            
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            
            comboBox1.DataSource = clientes;
            comboBox1.DisplayMember = "nome";
        }
    }
}
